﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

/*
namespace Super.Common
{
    public class MvcWebRequest
    {
        /// <summary>
        /// 接受请求的参数(代替Request.QueryString[])
        /// </summary>
        /// <param name="param">参数名称</param>
        /// <returns>返回接收到的参数值[没有此参数或接收为空时则返回string.Empty]</returns>
        public static string Query(string param)
        { 
            return HttpContext.Current.Request.QueryString[param] == null
                       ? string.Empty
                       : HttpContext.Current.Request.QueryString[param].Trim();

        }

        /// <summary>
        ///接受请求参数 （代替 Request.Form[]）
        /// </summary>
        /// <param name="param">参数名称</param>
        /// <returns>返回接收到的参数值[没有此参数或接收为空时则返回string.Empty]</returns>
        public static string Form(string param)
        {

            return HttpContext.Current.Request.Form[param] == null
                       ? string.Empty
                       : HttpContext.Current.Request.Form[param].Trim();

        }

        /// <summary>
        /// 处理MVC的Form表单（代替mvc里面的form[param]）
        /// </summary>
        /// <param name="form"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static string MvcForm(FormCollection form, string name)
        {
            return form[name] == null
                ? string.Empty
                : form[name].Trim();
        }

    }
}
*/